package com.efrei.schoolmanager.model.hibernate.dao;

import java.util.List;

import org.hibernate.HibernateException;
import org.hibernate.Session;

import com.efrei.schoolmanager.model.dao.HibernateDAO;
import com.efrei.schoolmanager.model.obj.Medecin;

/**
 * DAO pour les medecins avec hibernate
 */
public class MedecinDAO extends HibernateDAO<Medecin> {

	public MedecinDAO(Session session) {
		super(session, Medecin.class);
	}

	/**
	 * @return la liste des medecins
	 * @throws HibernateException
	 */
	public List<Medecin> getMedecins() throws HibernateException {
		return content("FROM Medecin ORDER BY nom, prenom");
	}
}
